<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      body {
        height: 3000px;
      }
      .box {
        position: fixed;
        left: 50%;
        height: 100px;
        width: 1200px;
        margin: 0 auto;
        transform: translateX(-50%);
        background-color: #f00;
      }
    </style>
  </head>
  <body>
    <div class="box">aaaa</div>
  </body>
</html>
